using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using tutors_clus.Models.Mapping;

namespace tutors_clus.Models
{
    public partial class tutors_clubContext : DbContext
    {
        static tutors_clubContext()
        {
            Database.SetInitializer<tutors_clubContext>(null);
        }

        public tutors_clubContext()
            : base("Name=tutors_clubContext")
        {
        }

        public DbSet<annoucement> annoucements { get; set; }
        public DbSet<comment> comments { get; set; }
        public DbSet<course> courses { get; set; }
        public DbSet<file_attach> file_attach { get; set; }
        public DbSet<message_file> message_file { get; set; }
        public DbSet<message> messages { get; set; }
        public DbSet<news> news { get; set; }
        public DbSet<student_course> student_course { get; set; }
        public DbSet<student> students { get; set; }
        public DbSet<sysdiagram> sysdiagrams { get; set; }
        public DbSet<teacher> teachers { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new annoucementMap());
            modelBuilder.Configurations.Add(new commentMap());
            modelBuilder.Configurations.Add(new courseMap());
            modelBuilder.Configurations.Add(new file_attachMap());
            modelBuilder.Configurations.Add(new message_fileMap());
            modelBuilder.Configurations.Add(new messageMap());
            modelBuilder.Configurations.Add(new newsMap());
            modelBuilder.Configurations.Add(new student_courseMap());
            modelBuilder.Configurations.Add(new studentMap());
            modelBuilder.Configurations.Add(new sysdiagramMap());
            modelBuilder.Configurations.Add(new teacherMap());
        }
    }
}
